package top.gokzzz.log.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;

/**
 * 系統 API 日誌
 *
 * @author Gok
 * @version 1.0
 */
@Entity
@Table(name = "SYS_API_LOG")
public class SysApiLog extends BaseEntity {
    private static final long serialVersionUID = 7180138084176341068L;

    /**
     * 日誌類型
     */
    @Column(name = "LOG_TYPE")
    private String logType;

    /**
     * 描述
     */
    @Column(name = "DESCRIPTION")
    private String description;

    /**
     * 方法名
     */
    @Column(name = "METHOD")
    private String method;

    /**
     * 請求路徑
     */
    @Column(name = "URL")
    private String url;

    /**
     * 參數
     */
    @Lob
    @Column(name = "PARAMS")
    private String params;

    /**
     * 請求 IP
     */
    @Column(name = "REQUEST_IP")
    private String requestIp;

    /**
     * 請求耗時 ms
     */
    @Column(name = "TIME")
    private Long time;

    /**
     * 異常詳情
     */
    @Lob
    @Column(name = "EXCEPTION_DETAIL")
    private byte[] exceptionDetail;

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getParams() {
        return params;
    }

    public void setParams(String params) {
        this.params = params;
    }

    public String getRequestIp() {
        return requestIp;
    }

    public void setRequestIp(String requestIp) {
        this.requestIp = requestIp;
    }

    public Long getTime() {
        return time;
    }

    public void setTime(Long time) {
        this.time = time;
    }

    public byte[] getExceptionDetail() {
        return exceptionDetail;
    }

    public void setExceptionDetail(byte[] exceptionDetail) {
        this.exceptionDetail = exceptionDetail;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getLogType() {
        return logType;
    }

    public void setLogType(String logType) {
        this.logType = logType;
    }
}
